<div *ngIf="messageService.messages.length">
  <h2>Messages</h2>
  <button (click) = "messageService.clear()">清除</button>
  <div *ngFor="let message of messageService.messages">
      {{message}}
  </div>
</div>